import request from '@/utils/request'

// 获取素材总数
export function materialCount() {
  return request({
    url: '/wx/assets/materialCount',
    method: 'get'
  })
}
// 根据类别分页获取非图文素材列表
export function materialFileBatchGet(query) {
  return request({
    url: '/wx/assets/materialFileBatchGet',
    method: 'get',
    params: query
  })
}

//分页获取图文素材列表
export function materialNewsBatchGet(query) {
  return request({
    url: '/wx/assets/materialNewsBatchGet',
    method: 'get',
    params: query
  })
}
// 添加多媒体永久素材
export function materialFileUpload(data) {
  return request({
    url: '/wx/assets/materialFileUpload',
    method: 'post',
    data: data,
    headers: { 'Content-Type': 'multipart/form-data' }
  })
}

// 删除素材
export function materialDelete(data) {
  return request({
    url: '/wx/assets/materialDelete',
    method: 'post',
    data: data
  })
}
